﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Business.Migrations
{
    public partial class createnewappli : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
          

           

            migrationBuilder.CreateTable(
                name: "base_good",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    Auxiliarybarcode = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ItemNo = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Length = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Barcode = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Weight = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Referenceprice = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Abbreviation = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Width = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodNo = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HangTagPrice = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Classification = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodType = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    VolumeUnit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LengthUnit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Volume = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InsuredValue = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Grade = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WeightUnit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BrandNo = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Unit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Height = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_base_good", x => x.Id);
                });

          

            migrationBuilder.CreateTable(
                name: "brand",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    BrandName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BrandNo = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_brand", x => x.Id);
                });

       

            migrationBuilder.CreateTable(
                name: "InboundAppointments",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    Remind = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PurchaseNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HandoverStatus = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InboundStatus = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ApplicationTimeline = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DocumentNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ReservoirAreaId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    RegionId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Documenttype = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    RepositoryId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Applicant = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    TrackingNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Field118 = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MakeAppointment = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Carriers = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ExternalNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HandoverTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BinlocationId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DocumentRemarks = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_InboundAppointments", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "inventoryQuantity",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    ProductID = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Unit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AvailableInventory = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MaxStock = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SellingInTransit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    StorageLocationId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    TotalInTransit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ActualInventory = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    TransferringInTransit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LastUpdated = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PurchasingInTransit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    FrozenInventory = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AreaId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WarehouseAreaId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProcessingOrderInTransit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WarehouseID = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    OtherInTransit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LockedInventory = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_inventoryQuantity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "purchase",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    PurchaseUnitprice = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProcurementTotal = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProcurementFreight = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PurchasingStaff = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProcurementStatus = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SpecificationModel = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    QuantityPurchased = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PrepaymentAmount = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Brand = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Image = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PurchaseOrdernumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AfterFoldingprice = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    OtherFreight = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DateOfmanufacture = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    VendorID = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodID = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DateOfpurchase = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EstimatedArrivaldate = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WarehouseId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ExpirationDate = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DiscountedRate = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ReservoirId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WarehouselocationId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    RegionId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_purchase", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "spec",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    Color = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Otherspec = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Image = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SpecNo = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_spec", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "specType",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    SpecTypeNo = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SpecTypeName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_specType", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
       

            migrationBuilder.DropTable(
                name: "base_good");


            migrationBuilder.DropTable(
                name: "brand");

            migrationBuilder.DropTable(
                name: "InboundAppointments");

            migrationBuilder.DropTable(
                name: "inventoryQuantity");

            migrationBuilder.DropTable(
                name: "purchase");

            migrationBuilder.DropTable(
                name: "spec");

            migrationBuilder.DropTable(
                name: "specType");
        }
    }
}
